/**
 * @ author: 汪孟苹
 */
define([],function(){
	var tpl = {};
	tpl.queues = function(){
		var html = '';
		html += queues();
		return html;
	}
	tpl.tit = function(){
		var html = '';
		html += tit();
		return html;
	}
	tpl.scheme = function(){
		var html = '';
		html += scheme();
		return html;
	}
	
	var queues = function(){
		return 	'<script id="tpl_addPatient_queues" type="text/html">'+
				'{{each rows as value i}}'+
				'	<div class="queue-card {{if value.flag == true}} active{{/if}}" schemeId="{{value.schemeId}}" queueId="{{value.id}}" schemeBusiType="{{value.schemeBusiType}}">'+
				'		<i class="{{value.styleLogo}} queue-icon"></i>'+
				'		<div class="queue-name">{{value.queueName}}</div>'+
				'	</div>'+
				'{{/each}}'+
				/*'<div class="queue-add">'+
				'	<i class="fa fa-plus queue-icon"></i>'+
				'	<div class="queue-name">新增队列</div>'+
				'</div>'+*/
				'</script>';
	}
	var tit = function(){
		return 	'<script id="tpl_addPatient_tit" type="text/html">'+
				'	<h3 class="panel-title">{{queueName}}</h3>'+
				'</script>';
	}
	var scheme = function(){
		return 	'<script id="tpl_addPatient_scheme" type="text/html">'+
				'	{{if list.length != 0}}'+
				'	<div class="qaCard-subtit has-icon col-sm-12 col-md-12">'+
				'		<div id="specialNurseQueueName"><i class="fa fa-file-text"></i><span>方案</span></div>'+
				'	</div>'+
				'	{{each list as value i}}'+
				'	<div class="qaCard form-group form-group-sm col-sm-4 col-md-4 grid-label-6">'+
				'		<label class="control-label">{{value.schemeBusiName}}</label>'+
				'   	<div class="control-input">'+
				'			{{if value.status=="default"}}'+
				'				<select class="form-control" name="{{value.name}}">'+
				'					{{each value.rows as item i}}'+
				'   					<option value="{{item.schemeId}}" {{if value.val == item.schemeId}}selected="selected"{{/if}}>{{item.schemeName}}</option>'+
				'					{{/each}}'+
				'				</select>'+
				'			{{else if value.status=="readonly"}}'+
				'				{{each value.rows as item i}}'+
				'					{{if value.val == item.schemeId}}'+
				'					<p class="form-control-static" name="{{value.name}}" value="{{item.schemeId}}">{{item.schemeName}}</p>'+
				'					{{/if}}'+
				'				{{/each}}'+
				'			{{else if value.status=="disabled"}}'+
				'				<select class="form-control" name="{{value.name}}" disabled>'+
				'					{{each value.rows as item i}}'+
				'   					<option value="{{item.schemeId}}">{{item.schemeName}}</option>'+
				'					{{/each}}'+
				'				</select>'+
				'			{{/if}}'+
				'		</div>'+
				'	</div>'+
				'	{{/each}}'+
				'	{{/if}}'+
				'</script>';	
	}
	
	return tpl;
});